from selenium import webdriver
from time import sleep
import unittest
from lx4102.Page import Page
from lx4102.Page1 import Page1
from selenium.webdriver.common.by import By
class TestCase(unittest.TestCase):
    def setUp(self) -> None:
        self.driver=webdriver.Edge()



    def  tearDown(self) -> None:
        sleep(10)
        self.driver.quit()
    # def test_login_01(self):
    #     po=Page(self.driver)
    #     po.luoji_login_01()
    #     dy=self.driver.find_element(By.XPATH,'/html/body/div[2]/div/div[1]/div/p/span').text
    #     print(dy)
    #     self.assertEqual('jxw962973427',dy)
    #     dy2=self.driver.find_element(By.XPATH,'/html/body/div[6]/div/div[2]/div[2]/div[2]/a').text
    #     print(dy2)
    #     self.assertEqual('国台旗舰店',dy2)
    #     dy3=self.driver.find_element(By.XPATH,'/html/body/div[5]/div[2]/div[2]/div[1]/h1').text
    #     print(dy3)
    #     self.assertIn('国台',dy3)
    #
    #     dy4=self.driver.find_element(By.XPATH,'//*[@id="addToCartForDetail"]').text
    #     print(dy4)
    #     self.assertEqual('到货通知',dy4)
    #
    #     dy5=self.driver.find_element(By.XPATH,'bind-send-text')
    #     self.assertIn(dy5,'第一时间给您通知')

    def test_login_01(self):
        po=Page1(self.driver)
        po.luoji_login_02()
if __name__ == '__main__':
    unittest.main()